import {$H} from '../common/http.js'

// 登录
export const postLogin = (data) => {
    return $H({
        url: '/user/phonelogin',
        method: 'POST',
        data: {
            phone: data.tel,
            code: data.code
        }
    })
}

// 注册
export const postRegister = (data) => {
    return $H({
        url: '/user/register',
        method: 'POST',
        data: {
            phone: data.tel,
            code: data.code
        }
    })
}

// 获取验证码
export const sendCode = (data) => {
    return $H({
        url: '/sms/sendCode',
        method: 'POST',
        data: {
            phone: data.phone
        }
    })
}